package com.tang.wx.handler;

import com.tang.wx.enums.WxMsgTypeEnum;
import com.tang.wx.utils.WxMsgUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.Map;

@Slf4j
@Service
public class SubscribeMsgHandler implements WxMsgHandler {
    @Override
    public WxMsgTypeEnum getMsgType() {
        return WxMsgTypeEnum.SUBSCRIBE;
    }

    @Override
    public String handleMsg(Map<String, String> msgMap) {
        log.info("用户关注事件");
        return WxMsgUtil.buildTextMsg(msgMap,
                "感谢您的关注，欢迎来到TcClub社区");
    }
}
